package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.util.Objects;

/***
 *@ClaseName:TbAddress
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 14:14
 */
@Entity
@Table(name = "tb_address", schema = "simpleshop", catalog = "")
public class TbAddress {
    private long id;
    private String receiver;
    private String phone;
    private String province;
    private String city;
    private String district;
    private String address;
    private Integer isDelete;
    private Integer isUse;
    private String userId;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "receiver")
    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    @Basic
    @Column(name = "phone")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "province")
    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    @Basic
    @Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    @Basic
    @Column(name = "district")
    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }


    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "is_use")
    public Integer getIsUse() {
        return isUse;
    }

    public void setIsUse(Integer isUse) {
        this.isUse = isUse;
    }

    @Basic
    @Column(name = "user_id")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbAddress tbAddress = (TbAddress) o;
        return id == tbAddress.id &&
                Objects.equals(receiver, tbAddress.receiver) &&
                Objects.equals(phone, tbAddress.phone) &&
                Objects.equals(province, tbAddress.province) &&
                Objects.equals(city, tbAddress.city) &&
                Objects.equals(district, tbAddress.district) &&
                Objects.equals(address, tbAddress.address) &&
                Objects.equals(isDelete, tbAddress.isDelete) &&
                Objects.equals(isUse, tbAddress.isUse) &&
                Objects.equals(userId, tbAddress.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, receiver, phone, province, city, district, address, isDelete, isUse, userId);
    }
}
